#ifndef __CODE_GEN__
#define __CODE_GEN__

#include <stdio.h>
#include "tree_dstruct.h"
#include "generate.h"
#include "register.h"

#define str		set_tmp_register
#define ftr		free_tmp_register
#define atr		alloc_tmp_register
#define grn		get_reg_name

#define n		bnode
#define LC		LEFT_CHILD
#define RC		RIGHT_CHILD

#ifndef GEN_COL
#define code(...)	printf(__VA_ARGS__)
#else
#define code(...)	dprintf(5, "\x1b[33m"), dprintf(5, __VA_ARGS__), dprintf(5, "\x1b[0m")
#endif

void generate_code_fix_sp(int);
int generate_code_mov_free_args(tree_node_t*, int);

#endif
